import request from "../../request/request"
Page({
  data: {
    goodsInfo: {}
  },
  onLoad: function (options) {
    this.getDetail(options.goods_id);
  },
  // 获取商品的详情数据
  getDetail(goods_id) {
    request({
      url: "goods/detail",
      data: {
        goods_id
      }
    }).then(res => {
      this.setData({
        goodsInfo: res.data.message
      })
    })
  }
})